/**
 * Copyright (C) 2010-2025 Structr GmbH
 *
 * This file is part of Structr <http://structr.org>.
 *
 * Structr is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * Structr is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Structr.  If not, see <http://www.gnu.org/licenses/>.
 */
#schema-container {
	height: calc(100vh - 8rem);
}

#schema-graph {
	background-color: var(--main-background);
	position: relative;
	top: 2rem;
}

#schema-graph.hide-inheritance-arrows .dashed-inheritance-relationship {
	display: none;
}

#schema-graph.hide-relationship-labels .rel-type,
#schema-graph.hide-relationship-labels .multiplicity {
	display: none;
}

#schema-graph.noselect, .graphNoSelect {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

#schema-graph .node {
	position: absolute;
	background-color: var(--solid-white);
	box-shadow: 0 0 .625rem 0 rgba(0, 0, 0, 0.1);
	padding: .5rem;
	margin: 0 ! important;
	cursor: move;
}

#schema-graph .node.selected {
	border-color: var(--color-folder);
	background-color: var(--color-folder) !important;
}

#schema-graph .label.rel-type.selected {
	border-color: var(--light-ocker);
	background-color: var(--color-folder) !important;
}

#schema-graph .label.schema-reltype-warning {
	background: var(--error-bg-light-red) !important;
}

.schema {
	padding-bottom: 6px ! important;
}

.schema h3 {
	margin: 6px 0 2px 0;
}

#zoom-slider {
	z-index: 10;
	width: 10rem;
}

#zoom-slider, #zoom-slider span {
	border: .1rem solid var(--input-field-border);
	background-color: var(--input-background);
}

#node-type-selector, #rel-type-selector, #saved-layout-selector {
	margin-right: 1rem;
	min-width: 20rem;
}

#reindex-nodes, #reindex-rels {
	min-width: 14rem;
}

#save-layout-filename {
	padding: 3px 2px 2px 4px;
	margin-right: 8px;
}

.schema-props {
	background-color: var(--solid-white);
	width: 100%;
	border-collapse: collapse;
}

#methods-container-left {
	flex-basis: 30%;
	flex-shrink: 1;
	margin-right: 6px;
	overflow-y: auto;
}

.actions.schema-props .schema-grid-row.editing > div {
	background: var(--very-light-structr-green);
}

.related-attrs .no-rels {
	text-align: center;
	color: grey;
	font-style: italic;
	padding-top: 5px;
	padding-bottom: 6px;
}

.related-attrs .relationship-arrow {
	margin: 1px -1px 0 -1px;
}

.related-attrs .cardinality {
	font-style: initial;
	font-weight: bold;
	position: relative;
	right: -0.75ch;
	width: 0;
	top: -1ch;
}

.related-attrs .cardinality.one::before {
	content: '1';
}

.related-attrs .cardinality.one {
	top: -10px;
}

.related-attrs .cardinality.many::before {
	content: '*';
}

.related-attrs .truncate.break-on-hover:hover {
	/* undo truncate and add line break */
	overflow: initial;
	text-overflow: initial;
	white-space: normal;
	line-break: anywhere;
}

.squarebrackets:after,
.squarebrackets:before {
	position: absolute;
	content: '';
	border: .125rem solid;
	top: 0;
	bottom: 0;
	width: .25rem;
}
.squarebrackets:after {
	border-left: none;
	right: 0;
}
.squarebrackets:before {
	border-right: none;
	left: 0;
}

#schema-graph .label {
	font-size: .875rem;
	min-width: 1rem;
	text-align: center;
	padding: .5rem;
	box-shadow: 0 0 .625rem 0 rgba(0, 0, 0, 0.1);
}

#schema-graph .label svg {
	display: none;
}
#schema-graph .label:hover svg {
	display: inline-block;
}

#schema-graph .icons-container {
	position: absolute;
	right: .25rem;
	top: .5rem;
}

#schema-graph .node {
	cursor: pointer;
	border-radius: 1rem;
}

#schema-graph .node h2 {
	margin: 6px 0;
}

#schema-graph .node:hover {
	filter: drop-shadow(0 0 0.625rem rgba(0, 0, 0, 0.1));
}

#schema-graph ._jsPlumb_endpoint_anchor {
	z-index: 9999;
}

#schema-graph rect {
	filter: drop-shadow(0 0 0.625rem rgba(0, 0, 0, 0.1));
}

.schema b,
.schema-details b {
	display: inline-block;
}

.schema-props .property-name:hover:not(:disabled),
.schema-props .property-dbname:hover,
.schema-props .property-format:hover,
.schema-props .property-default:hover,
.schema-details .property-code:hover {
	cursor: text;
	color: var(--gray-222);
	background-color: var(--very-very-light-yellow);
	-webkit-box-shadow: 0 0 5px yellow;
	-moz-box-shadow: 0 0 5px var(--gray-888);
	box-shadow: 0 0 5px var(--gray-888);
}

.schema-props > tr:hover {
	background-color: var(--very-very-light-yellow);
}

.schema-details .edit-schema-object span {
	border-bottom: .1rem dashed var(--gray-999);
}

.schema-visibility-table .toggle-column-header {
	width: 6rem;
	text-align: left;
	padding-left: .5rem;
}

.schema-visibility-table td:first-child {
	text-align: center;
}

.sliderLabel {
	padding-top: 10px;
}

.schema b {
	margin: 0 3.5rem;
	display: block;
	text-align: center;
	font-weight: 500;
}

.schema .extends-class {
	text-align: center;
	display: none;
}

.edge-style.active {
	font-weight: 500;
	color: var(--solid-black);
}

.edge-style.active::before {
	content: '✓ ';
	color: var(--structr-green);
}

#inheritance-tree.slideOut {
	width: 32rem;
	left: -36rem;
	display: flex;
	flex-direction: column;
}

#inheritance-tree .jstree-default .jstree-node {
	position: relative;
}

#inheritance-tree .jstree-anchor {
	width: calc(100% - 30px);
}

#inheritance-tree-container {
	overflow: auto;
}

div#inheritance-tree-container {
	margin-left: 0.5rem;
}